package com.fortune.service.impl;

import com.fortune.dao.CReturnDepositDao;
import com.fortune.dao.DriverReturnDepositDao;
import com.fortune.service.DriverReturnDepositService;
import com.fortune.vo.cReturnDeposit.CReturnDepositDetail;
import com.fortune.vo.cReturnDeposit.DetailCReturn;
import com.fortune.vo.driverReturnDeposit.DriverReturnDepositDetail;
import com.fortune.vo.driverReturnDeposit.DriverReturnDepositInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2018/5/24 0024.
 */
@Service
public class DriverReturnDepositServiceImpl implements DriverReturnDepositService{
    @Autowired
    private DriverReturnDepositDao driverReturnDepositDao;
    @Override
    public List<DriverReturnDepositInfo> findDriverReturnDepositList(String mid,String did,String id) {
        return driverReturnDepositDao.findDriverReturnDepositList(mid,did,id);
    }

    @Override
    public DriverReturnDepositDetail findDriverReturnDepositDetail(String id, String clientId, String mid, String did) {
        DriverReturnDepositDetail driverReturnDepositDetail = driverReturnDepositDao.findClient(clientId,mid,did);
        List<DetailCReturn> list = driverReturnDepositDao.findDriverReturnDepositDetail(id,clientId,mid,did);
        driverReturnDepositDetail.setList(list);
        return driverReturnDepositDetail;
    }
}
